﻿using MODEL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IDAL;
using System.Data.Entity.Infrastructure;
using System.Data.Entity;

namespace DAL
{
   public class ProductCategoryDAL:BaseDAL<ProductCategory>,IProductCategoryDAL
    {
       //侯海啸
        public List<ProductCategory> GetSub(int id)
        {
            return entities.ProductCategory.Where(x => x.PID == id).ToList();
        }
        public override void Update(ProductCategory model)
        {
            DbEntityEntry entityEntry = entities.Entry<ProductCategory>(model);
            entityEntry.State = EntityState.Modified;
            entityEntry.Property("CreateTime").IsModified = false;

        }

    }
}
